Skip to content

blk-integrity: fix slab-out-of-bounds in t10_pi_verify on namespace revalidation#912

Open
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1103689=>linus-master
Open

blk-integrity: fix slab-out-of-bounds in t10_pi_verify on namespace revalidation#912
blktests-ci[bot] wants to merge 1 commit into
linus-master_basefrom
series/1103689=>linus-master

Conversation

@blktests-ci

@blktests-ci blktests-ci Bot commented May 31, 2026

Copy link
Copy Markdown

Pull request for series with
subject: blk-integrity: fix slab-out-of-bounds in t10_pi_verify on namespace revalidation
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1103689

@blktests-ci

blktests-ci Bot commented May 31, 2026

Copy link
Copy Markdown
Author

Upstream branch: 8fde5d1
series: https://patchwork.kernel.org/project/linux-block/list/?series=1103689
version: 1

@blktests-ci

blktests-ci Bot commented Jun 1, 2026

Copy link
Copy Markdown
Author

Upstream branch: e43ffb6
series: https://patchwork.kernel.org/project/linux-block/list/?series=1103689
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1103689=>linus-master branch from a0ae43f to c129afa Compare June 1, 2026 09:19
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from c6dc343 to fc36596 Compare June 3, 2026 13:56
@blktests-ci

blktests-ci Bot commented Jun 3, 2026

Copy link
Copy Markdown
Author

Upstream branch: ba3e43a
series: https://patchwork.kernel.org/project/linux-block/list/?series=1103689
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1103689=>linus-master branch from c129afa to 529672f Compare June 3, 2026 14:16
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from fc36596 to 7bed9c3 Compare June 5, 2026 09:48
@blktests-ci

blktests-ci Bot commented Jun 5, 2026

Copy link
Copy Markdown
Author

Upstream branch: ddd664b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1103689
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1103689=>linus-master branch from 529672f to 916540a Compare June 5, 2026 10:04
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 7bed9c3 to a7bb5c5 Compare June 7, 2026 14:54
@blktests-ci

blktests-ci Bot commented Jun 7, 2026

Copy link
Copy Markdown
Author

Upstream branch: 979c294
series: https://patchwork.kernel.org/project/linux-block/list/?series=1103689
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1103689=>linus-master branch from 916540a to ff39d2c Compare June 7, 2026 15:10
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from a7bb5c5 to 5e41a3b Compare June 10, 2026 13:31
@blktests-ci

blktests-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown
Author

Upstream branch: acb7500
series: https://patchwork.kernel.org/project/linux-block/list/?series=1103689
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1103689=>linus-master branch from ff39d2c to 5bb0fb3 Compare June 10, 2026 14:04
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 5e41a3b to c3a084b Compare June 10, 2026 20:26
@blktests-ci

blktests-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown
Author

Upstream branch: 9716c08
series: https://patchwork.kernel.org/project/linux-block/list/?series=1103689
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1103689=>linus-master branch from 5bb0fb3 to cc63f98 Compare June 11, 2026 09:36
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from c3a084b to 5f78e5d Compare June 12, 2026 22:27
@blktests-ci

blktests-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown
Author

Upstream branch: 2a2974b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1103689
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1103689=>linus-master branch from cc63f98 to b7323e7 Compare June 12, 2026 23:01
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 5f78e5d to e48f9db Compare June 13, 2026 01:19
@blktests-ci

blktests-ci Bot commented Jun 13, 2026

Copy link
Copy Markdown
Author

Upstream branch: 062871f
series: https://patchwork.kernel.org/project/linux-block/list/?series=1103689
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1103689=>linus-master branch from b7323e7 to 958db76 Compare June 13, 2026 01:59
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch 2 times, most recently from 199644a to e6d9eb8 Compare June 17, 2026 12:02
@blktests-ci

blktests-ci Bot commented Jun 17, 2026

Copy link
Copy Markdown
Author

Upstream branch: 66affa3
series: https://patchwork.kernel.org/project/linux-block/list/?series=1103689
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1103689=>linus-master branch from 958db76 to 96f4a49 Compare June 17, 2026 14:31
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from e6d9eb8 to 7d8604f Compare June 24, 2026 01:11
…evalidation

Abort early with BLK_STS_PROTECTION if a namespace revalidation changed
bi->metadata_size after bio_integrity_prep() sized the allocation.

Found by FuzzNvme (Syzkaller with FEMU fuzzing framework).

When a namespace is revalidated between bio_integrity_prep() and
bio_integrity_verify_fn(), the integrity profile's metadata_size may
change under the in-flight bio. bio_integrity_verify_fn() re-reads the
live blk_integrity via blk_get_integrity(), so blk_integrity_iterate()
uses the new metadata_size as the per-interval step size against a
buffer sized for the old one, advancing iter->prot_buf past the end of
the allocation.

task 1:
  bio_integrity_prep()
    bio_integrity_alloc_buf()
      len = bio_integrity_bytes(bi, bio_sectors(bio))   ...(1)
      bip->bip_iter.bi_size = len

task 2:
  nvme_update_ns_info_block()
    blk_mq_freeze_queue()
    nvme_init_integrity()
      bi->metadata_size = head->ms                      ...(2)
    blk_mq_unfreeze_queue()

task 3:
  bio_integrity_verify_fn()
    bio_integrity_verify()
      blk_integrity_iterate()
        bi = blk_get_integrity()                        ...(3)
        iter->interval_remaining = 1 << bi->interval_exp
        iter->prot_buf += bi->metadata_size per interval
        /* step size from (3), buffer sized at (1): overrun */

Fixes: 8098514 ("block: always allocate integrity buffer when required")
Signed-off-by: Samin Y. Chowdhury <samin_c@outlook.com>
Acked-by: Sungwoo Kim <iam@sung-woo.kim>
Acked-by: Dave Tian <daveti@purdue.edu>
Acked-by: Weidong Zhu <weizhu@fiu.edu>
Acked-by: Ruimin Sun <rsun@fiu.edu>
@blktests-ci

blktests-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Author

Upstream branch: bade58e
series: https://patchwork.kernel.org/project/linux-block/list/?series=1103689
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1103689=>linus-master branch from 96f4a49 to 2b75ec7 Compare June 24, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant